﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace lcs.Web.Admin.monthsked
{
    /// <summary>
    /// Pic1 的摘要说明
    /// </summary>
    public class Pic1 : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
                if (null != context.Request.QueryString["id"] && null!= context.Request.QueryString["type"])
                {//获取前台传来的值  
                string strid = context.Request.Params["id"];
                string type = context.Request.Params["type"];
                int mid = (Convert.ToInt32(strid));
                BLL.monthsked bll = new BLL.monthsked();
                byte[] pics = bll.GetPic(mid, type);
                if (pics != null)
                    context.Response.BinaryWrite(pics);
                else
                    context.Response.Write("");
            }
                
            
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}